<?php

namespace App\Listeners;

use App\Models\Log;
use Illuminate\Auth\Events\Login;


class LogSuccessfulLogin
{


    public function __construct()
    {
    }

    /**
     * @param Login $event
     */
    public function handle(Login $event)
    {
        $log = new Log();
        $log->handlers = $event->user->name;
        $log->logs = '登录';
        $log->user_id = $event->user->id;
        $log->save();
    }
}
